package ptumall.utils;

public enum ResultCodeEnum {
    SUCCESS(200,"成功"),
    FAIL(400,"失败"),
    AD_REQUEST(400,"Bad Request"),
    UNAUTHORIZED(401,"认证失败!"),//未认证
    NOT_FOUND(404,"接口不存在!"),//接口不存在
    INTERNAL_SERVER_ERROR(500,"系统繁忙!"),//服务器内部错误
    METHOD_NOT_ALLOWED(405,"方法不被允许"),

    /*参数错误:1001-1999*/
    PARAMS_IS_INVALID(1001,"参数无效!"),
    PARAMS_IS_BLANK(1002,"参数为空!"),
    USER_IS_EXITES(1003,"用户名已存在!");


    private Integer code;
    private String message;


    ResultCodeEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
